//前台  所有的提示弹窗请按照后台发布投标方法issueBidInvite修改2020.12.16  分页参照后台招标分页2020.12.16
	
//检查推荐人是否存在
function checkUpUserID(ckUpUserID){
if(ckUpUserID==""){
$("#signup-orgID").attr('disabled', false);	
}   
else{
$.ajax({
        url:"/mmy/isexistupuserid?iUpUserID="+ckUpUserID,
        type:"post",
        dataType:"text",
        success:function (data) {
	
			if(data=="false"){
				 var txt=  "推荐人不存在，请重新输入！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						$("#signup-upUserID").focus();
						
						}});
				
				return false;
			}
        }
    });


  $.ajax({
        url:"/mmy/changeorgid?iUserID="+ckUpUserID,
        type:"post",
        dataType:"text",
        success:function (date) {
			$("#signup-orgID").val(date);
			$("#signup-orgID").attr('disabled', true);
			}
        
    });
}
}	

//前台点击登录  注册弹窗隐藏 2020.11.10 hanxl
function loginShow(){
	document.getElementById("loginOnclick").style.display="block";
	document.getElementById("regOnclick").style.display="none";
}
//前台点击注册  登录弹窗隐藏 2020.11.10 hanxl
function regShow(){
	document.getElementById("loginOnclick").style.display="none";
	document.getElementById("regOnclick").style.display="block";
}
//注册 验证 2020.11.10 hanxl
function registerSubmit(register){
	 if(!(/^[a-zA-z]\w{3,15}$/.test(register.UserAccount.value))){ 
	 
 var txt=  "用户登录名格式错误！由字母、数字、下划线组成，字母开头，4-16位";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							register.UserAccount.focus();
							
						}});
						
	return false;
    }
 if(!(/^1[3456789]\d{9}$/.test(register.UserMobile.value))){ 
	 var txt=  "用户手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						register.UserMobile.focus();
						
						}});
	
		return false;
    } 
 if(!(/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(register.Mail.value))){ 
    
 var txt=  "用户邮箱格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						register.Mail.focus();
						
						}});
	return false;
    } 
 if(!(/(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$)/.test(register.Identity.value))){ 
	 var txt=  "用户身份证号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							register.Identity.focus();
						
						}});
						return false;	
    } 
  if(!(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z\\W]{6,20}$/.test(register.PassWord.value))){ 
	 var txt=  "用户密码格式错误！密码包含 数字,英文可以包含特殊字符，长度6-20。";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							register.PassWord.focus();
						}});
	return false;	
    } 
    if(register.RePassword.value!=register.PassWord.value){ 
	 var txt=  "两次输入的密码不一致！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							register.RePassword.focus();
						}});
	return false;	
    } 
return true;
}
//修改个人信息 验证 2020.11.10 hanxl
function updateUserSubmit(updateUserForm){
	 if(!(/^[a-zA-z]\w{3,15}$/.test(updateUserForm.UserAccount.value))){ 
	   var txt=  "用户登录名格式错误！由字母、数字、下划线组成，字母开头，4-16位";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							updateUserForm.UserAccount.focus();
						}});
	return false;	
    }
 if(!(/^1[3456789]\d{9}$/.test(updateUserForm.UserMobile.value))){ 
      var txt=  "用户手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							updateUserForm.UserMobile.focus();
						}});
	return false;	
    } 
 if(!(/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(updateUserForm.Mail.value))){ 
   var txt=  "用户邮箱格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							updateUserForm.Mail.focus();
						}});
	return false;	
    } 
 if(!(/(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$)/.test(updateUserForm.Identity.value))){ 
	  var txt=  "用户身份证号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						updateUserForm.Identity.focus();
						}});
	return false;	
    } 
if(!(/^\d{3}-\d{7,8}|\d{4}-\d{7,8}$/.test(updateUserForm.Tel.value))){ 
	  var txt=  "用户固定电话号码格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
					updateUserForm.Tel.focus();
						}});
	return false;	
    } 
return true;
}
//修改密码信息 验证 2020.11.10 hanxl
function updatePasswordSubmit(updatePasswordForm){
    var oldPass=$("#oldPassword").val();
    if(updatePasswordForm.PassWord.value!=oldPass){ 
  var txt=  "输入密码与原密码不一致！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				updatePasswordForm.PassWord.focus();
						}});   	
	return false;	
    } 
    if(!(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z\\W]{6,20}$/.test(updatePasswordForm.strPassword.value))){ 
	 var txt=  "用户密码格式错误！密码包含 数字,英文可以包含特殊字符，长度6-20。";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				updatePasswordForm.strPassword.focus();
						}}); 
	return false;	
    }  
	if(updatePasswordForm.strPassword.value==oldPass){ 
	 var txt=  "新密码不可以与旧密码相同！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				updatePasswordForm.strPassword.focus();
						}}); 
	return false;	
    }  
    
    if(updatePasswordForm.RePassword.value!=updatePasswordForm.strPassword.value){ 
var txt=  "两次输入的密码不一致！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				updatePasswordForm.RePassword.focus();
						}}); 
return false;	
    } 
return true;
}
//修改地址信息 验证 2020.11.10 hanxl
function createAddressSubmit(createAddressForm){
 if(!(/^1[3456789]\d{9}$/.test(createAddressForm.Mobile.value))){ 
var txt=  "用户手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				createAddressForm.Mobile.focus();
						}});   
return false;	
    } 
 if(createAddressForm.Province.value==""){ 
var txt=  "请选择所在省份！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				createAddressForm.Province.focus();
						}});     
return false;	
    } 
if(createAddressForm.City.value==""){ 
var txt=  "请选择所在市！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				createAddressForm.City.focus();
						}});     
return false;	
    }
if(createAddressForm.ZoneID.value==""){ 
var txt=  "请选择所在区！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				createAddressForm.ZoneID.focus();
						}});    
return false;	
    }

if(!(/^[1-9][0-9]{5}$/.test(createAddressForm.Postcode.value))){ 
var txt=  "用户邮编格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				createAddressForm.Postcode.focus();
						}});    
	return false;	
    } 
return true;
}
// 修改收货基本信息 2020.11.10 hanxl
	function updateSysAddress(){
		 var checkNum = $("input[name='ckone']:checked").length;
		    if(checkNum==0){
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iAddressID =  $("input[name='ckone']:checked").val();	 
					 location.href="/mmy/toupdatesysaddress?iAddressID="+iAddressID;
				}
				}
// 删除个人中心 地址 2020.11.10
function  delSysAddressBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;
    if(checkNum==0){
      var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
	var txt=  "确定要删除吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
        });
   $.ajax({
        url:"/mmy/deletesysaddresschecked",
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);	
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
	}});
 
}
}
//前台个人中心取消景点预留 2020.11.10 hanxl
function scenicCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
				var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entersceniccancelreserve?iID=" + id;
			window.location = url;
	}});
}
}
// 前台个人中心取消线路预留 2020.11.10 hanxl
function lineCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterlinecancelreserve?iID=" + id;
			window.location = url;
	}});
}
}
//前台个人中心取消酒店房间预留 2020.11.10 hanxl
function roomCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterroomcancelreserve?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心取消餐馆预留 2020.11.10 hanxl
function restaurantCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
					var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterrestaurantcancelreserve?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心取消车辆预留 2020.11.10 hanxl
function carCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
				var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entercarcancelreserve?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心取消专列预留 2020.11.10 hanxl
function trainCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entertraincancelreserve?iID=" + id;
			window.location = url;
	}});
	}
}
//前台个人中心取消机票预留 2020.11.10 hanxl
function planeCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
				var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterplanecancelreserve?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心取消船票预留 2020.11.10 hanxl
function shipCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entershipcancelreserve?iID=" + id;
			window.location = url;
	}});
	
	}
	}
// 前台个人中心取消船票预留 2020.11.10 hanxl
function visaCancelReserve() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消预留吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entervisacancelreserve?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心景点申请退款 2020.11.10 hanxl
function scenicApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterscenicapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心线路申请退款 2020.11.10 hanxl
function lineApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterlineapplyrefund?iID=" + id;
			window.location = url;
	}});
		
	}
}
// 前台个人中心酒店房间申请退款 2020.11.10 hanxl
function roomcApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterroomapplyrefund?iID=" + id;
			window.location = url;
	}});
	
	}
}
// 前台个人中心餐馆申请退款 2020.11.10 hanxl
function restaurantApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterrestaurantapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
}
// 前台个人中心车辆申请退款 2020.11.10 hanxl
function carApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entercarapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心专列申请退款 2020.11.10 hanxl
function trainApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entertrainapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
}

// 前台个人中心机票申请退款 2020.11.10 hanxl
function planeApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/enterplaneapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
}

// 前台个人中心船票申请退款 2020.11.10 hanxl
function shipApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entershipapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
}
// 前台个人中心签证申请退款 2020.11.10 hanxl
function visaApplyCBack() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var txt=  "确定要取消订单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
			var url = "/mmy/entervisaapplyrefund?iID=" + id;
			window.location = url;
	}});
	}
	}
// 前台个人中心景点退单进度 2020.11.10 hanxl 
function sceniceRefundProcess() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
}
}
// 前台个人中心线路退单进度 2020.11.10 hanxl
function lineRefundProcess() {

		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心酒店房间退单进度 2020.11.10 hanxl
function roomRefundProcess() {
	
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心餐馆退单进度 2020.11.10 hanxl
function restaurantRefundProcess() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
		
		 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心车辆退单进度 2020.11.10 hanxl
function carRefundProcess() {

		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心专列退单进度 2020.11.10 hanxl
function trainRefundProcess() {

		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心机票退单进度 2020.11.10 hanxl
function planeRefundProcess() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
} 
// 前台个人中心船票退单进度 2020.11.10 hanxl
function shipRefundProcess() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心签证退单进度 2020.11.10 hanxl
function visaRefundProcess() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			 var progress = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(progress<=1){
				    var txt=  "退单审核中。。。。。。";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else if(progress==2){
				    var txt=  "允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}else {
				    var txt=  "不允许退单！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
			}
	}
}
// 前台个人中心景点撤销退单 2020.11.10 hanxl     2021.01.06hanxl var progress = $("input[name='scenicRefundProgress']").val();错误  参照上面参看退单进度修改
function scenicCancelRefund() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='scenicRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/entersceniccancelrefund?iID=" + id;
					window.location = url;
	}});
			}
}
}
//前台个人中心线路撤销退单 2020.11.10 hanxl
function lineCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='lineRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/enterlinecancelrefund?iID=" + id;
					window.location = url;
	}});
	}
}
}
// 前台个人中心酒店房间撤销退单 2020.11.10 hanxl
function roomCancelRefund() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='roomRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/enterroomcancelrefund?iID=" + id;
					window.location = url;
	}});
	}
}
}
// 前台个人中心餐馆撤销退单 2020.11.10 hanxl
function restaurantCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='restaurantRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/enterrestaurantcancelrefund?iID=" + id;
					window.location = url;
	}});
				
	}
}
}
// 前台个人中心车辆撤销退单 2020.11.10 hanxl
function carCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='carRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/entercarcancelrefund?iID=" + id;
					window.location = url;
	}});
				
	}
}
}
// 前台个人中心专列撤销退单 2020.11.10 hanxl
function trainCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='trainRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
					var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/entertraincancelrefund?iID=" + id;
					window.location = url;
	}});
				
	}
}
}
//前台个人中心机票撤销退单 2020.11.10 hanxl
function planeCancelRefund() {
		 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='planeRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/enterplanecancelrefund?iID=" + id;
					window.location = url;
	}});
				
	}
}
}
//前台个人中心船票撤销退单 2020.11.10 hanxl
function shipCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='shipRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
				var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/entershipcancelrefund?iID=" + id;
					window.location = url;
	}});
	}
}
}
// 前台个人中心签证撤销退单 2020.11.10 hanxl
function visaCancelRefund() {
	 var checkNum = $("input[name='radioThis']:checked").length;
		    if(checkNum==0){
                   var txt=  "请选择一条记录！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else{
			var progress = $("input[name='visaRefundProgress']").val();
			if(progress==2){
				    var txt=  "无法撤销";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			}else {
					var txt=  "确定要撤销退单吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var id = $("input[name='radioThis']:checked").val();
					var url = "/mmy/entervisacancelrefund?iID=" + id;
					window.location = url;
	}});
	}
}
}
// 个人中心 车辆订单 分页 hanxl 2020.11.15 
function carOrderPageSize(value){
	location.href="/mmy/mycarorder?pageSize=" + value;	
	}	
// 个人中心 车辆退单分页 hanxl 2020.11.15 
function carRefundPageSize(value){
		location.href="/mmy/mycarrefund?pageSize=" + value;	
		}
//个人中心 车辆预留 分页 hanxl 2020.11.15 
function carReservePageSize(value){
	location.href="/mmy/mycarreserve?pageSize=" + value;	
	}	
// 个人中心 酒店订单 分页 hanxl 2020.11.15 
function hotelOrderPageSize(value){
		location.href="/mmy/myhotelorder?pageSize=" + value;	
		}
//个人中心  酒店退单 分页 hanxl 2020.11.15 
function hotelRefundPageSize(value){
	location.href="/mmy/myhotelrefund?pageSize=" + value;	
	}
// 个人中心 酒店预留 分页 hanxl 2020.11.15 
function hotelReservePageSize(value){
	location.href="/mmy/myhotelreserve?pageSize=" + value;	
	}
//个人中心  线路订单 分页 hanxl 2020.11.15 
function lineOrderPageSize(value){
	location.href="/mmy/mylineorder?pageSize=" + value;	
	}
//个人中心  线路退单 分页 hanxl 2020.11.15
function lineRefundPageSize(value){
		location.href="/mmy/mylinerefund?pageSize=" + value;	
		}
// 个人中心 线路预留 分页 hanxl 2020.11.15 
function lineReservePageSize(value){
	location.href="/mmy/mylinereserve?pageSize=" + value;	
	}	
// 个人中心 机票订单 分页 hanxl 2020.11.15 
function planeOrderPageSize(value){
	location.href="/mmy/myplaneorder?pageSize=" + value;	
	}
// 个人中心 机票退单 分页 hanxl 2020.11.15 
function planeRefundPageSize(value){
		location.href="/mmy/myplanerefund?pageSize=" + value;	
	}
//个人中心  机票预留 分页 hanxl 2020.11.15 
function planeReservePageSize(value){
	location.href="/mmy/myplanereserve?pageSize=" + value;	
	}
// 个人中心 餐馆订单 分页 hanxl 2020.11.15 
function restaurantOrderPageSize(value){
	location.href="/mmy/myrestaurantorder?pageSize=" + value;	
	}
// 个人中心 餐馆退单 分页 hanxl 2020.11.15 
function restaurantRefundPageSize(value){
		location.href="/mmy/myrestaurantrefund?pageSize=" + value;	
	}
//个人中心  餐馆预留 分页 hanxl 2020.11.15 
function restaurantReservePageSize(value){
	location.href="/mmy/myrestaurtantreserve?pageSize=" + value;	
	}
// 个人中心 景点订单 分页 hanxl 2020.11.15 
function scenicOrderPageSize(value){
	location.href="/mmy/myscenicorder?pageSize=" + value;	
	}	
//个人中心  景点退单 分页 hanxl 2020.11.15 
function scenicRefundPageSize(value){
		location.href="/mmy/myscenicrefund?pageSize=" + value;	
	}	
// 个人中心 景点预留 分页 hanxl 2020.11.15 
function scenicReservePageSize(value){
	location.href="/mmy/myscenicreserve?pageSize=" + value;	
	}	
// 个人中心 船票订单 分页 hanxl 2020.11.15 
function shipOrderPageSize(value){
	location.href="/mmy/myshiporder?pageSize=" + value;	
	}
// 个人中心 船票退单 分页 hanxl 2020.11.15 
function shipRefundPageSize(value){
		location.href="/mmy/myshiprefund?pageSize=" + value;	
	}		
// 个人中心 船票预留 分页 hanxl 2020.11.15 
function shipReservePageSize(value){
	location.href="/mmy/myshipreserve?pageSize=" + value;	
	}
// 个人中心 专列订单 分页 hanxl 2020.11.15 
function trainOrderPageSize(value){
	location.href="/mmy/mytrainorder?pageSize=" + value;	
	}
// 个人中心 专列退单 分页 hanxl 2020.11.15 
function trainRefundPageSize(value){
		location.href="/mmy/mytrainrefund?pageSize=" + value;	
	}	
// 个人中心 专列预留 分页 hanxl 2020.11.15 
function trainReservePageSize(value){
	location.href="/mmy/mytrainreserve?pageSize=" + value;	
	}	
// 个人中心 签证订单 分页 hanxl 2020.11.15 
function visaOrderPageSize(value){
	location.href="/mmy/myvisaorder?pageSize=" + value;	
	}
// 个人中心 签证退单 分页 hanxl 2020.11.15 
function visaRefundPageSize(value){
		location.href="/mmy/myvisarefund?pageSize=" + value;	
	}
// 个人中心 签证预留 分页 hanxl 2020.11.15 
function visaReservePageSize(value){
	location.href="/mmy/myvisareserve?pageSize=" + value;	
	}
// 个人中心删除没有投标信息的招标基本信息
function delMyInviteBatch(){
	var checkNum = $("input[name='radioThis']:checked").length;
	if(checkNum==0){
       var txt=  "请选择一条记录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	} else{
			var txt=  "确定要删除吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iInviteID = $("input[name='radioThis']:checked").val();
			var url ="/mmy/deletemyinvitechecked?iInviteID="+iInviteID;
			window.location = url;
	}});
	}	
	}
// 个人中心招标 分页 hanxl 2020.11.15 
function invitePageSize(value){
	location.href="/mmy/myinvite?pageSize=" + value;	
	}
// 个人中心投标 分页 hanxl 2020.11.15 
function tenderPageSize(value){
	location.href="/mmy/mytender?pageSize=" + value;	
	}	
//前台招投标模块 点击参与投标 以及前台招标详情页面 点击投标	2020.12.10
function joinTender(iInviteID,strInviteName){
	location.href="/mmy/tofrontbidtenderindex?iInviteID=" + iInviteID+"&strInviteName=" +strInviteName;	
	}	
//前台投标模块 点击增加  创建投标信息	2020.12.10
function createBidTender(strInviteID,strInviteName){
 location.href="/mmy/tocreatebidtender?iInviteID="+strInviteID+"&strInviteName=" +strInviteName;	
				}	
	
//创建投标基本信息及行程	 2020.12.10 hanxl			
function saveCreateBidTender(){
	var strInviteID=$("#TenderInviteID").val();
	var strInviteName=$("#TenderInviteName").val();
	if($("#TenderBudget").val() == "" || $("#TenderBudget").val() == null){
		var txt=  "预算金额为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderBudget").focus();
						}}); 
		return false;
	}
	if($("#TenderOutDate").val() == "" || $("#TenderOutDate").val() == null){
		var txt=  "出行日期为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderOutDate").focus();
						}});
		return false;
	}
	if($("#TenderBackDate").val() == "" || $("#TenderBackDate").val() == null){
		var txt=  "返程日期为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderBackDate").focus();
						}}); 
		return false;
	}
	if($("#TenderOwn").val() == "" || $("#TenderOwn").val() == null){
		var txt=  "自费项目为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderOwn").focus();
						}});
		return false;
	}
	if($("#TenderTips").val() == "" || $("#TenderTips").val() == null){
		var txt=  "温馨提示为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderTips").focus();
						}}); 
		return false;
	}
	if($("#TenderStandard").val() == "" || $("#TenderStandard").val() == null){
		var txt=  "接待标准为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderStandard").focus();
						}});
		return false;
	}
	if($("#TenderExplain").val() == "" || $("#TenderExplain").val() == null){
		var txt=  "接待说明为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TenderExplain").focus();
						}});
		return false;
	}
	var bidtender= new Object();
	var objTable=$("#tripTable tbody");
if(objTable.length==1){
	var txt=  "投标行程不能为空，请输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				$("#btn_tripaddtr").click();
						}}); 
		return false;
}
	var objDetailedTable=$("#detailedTable tbody");
		if(objDetailedTable.length==1){
			var txt=  "投标明细不能为空，请输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#btn_detailedaddtr").click();
						}}); 
		return false;
		}
	//投标信息表里的招标编码
	bidtender.iInviteID=$("#TenderInviteID").val();
	bidtender.dOutDate=$("#TenderOutDate").val();
	bidtender.dBackDate=$("#TenderBackDate").val();
	bidtender.fBudget=$("#TenderBudget").val();
	bidtender.cOwn=$("#TenderOwn").val();
	bidtender.cTips=$("#TenderTips").val();
	bidtender.cStandard=$("#TenderStandard").val();
	bidtender.cExplain=$("#TenderExplain").val();
	bidtender.cMemo=$("#TenderMemo").val();
	var arr=[];
	arr.push(bidtender);
	var arrs=[];
	
	for( var i=1; i<objTable.length ; i++ )
	{
		
		var id=objTable[i].id;
		var num = id.substr(id.lastIndexOf("y") + 1);
		if($("#TripDay"+num).val() == "" || $("#TripDay"+num).val() == null){
			var txt=  "行程天数为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TripDay"+num).focus();
						}}); 
		return false;
	}
	if($("#TripAddress"+num).val() == "" || $("#TripAddress"+num).val() == null){
		var txt="天数"+$("#TripDay"+num).val()+"的地点为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#TripAddress"+i).focus();
						}});
		return false;
	}

	if($("#TripStay"+num).val() == "" || $("#TripStay"+num).val() == null){
			var txt="天数"+$("#TripDay"+num).val()+"的住宿为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TripStay"+i).focus();
						}});
		return false;
	}
	if($("#TripMeal"+num).val() == "" || $("#TripMeal"+num).val() == null){
		var txt="天数"+$("#TripDay"+num).val()+"的含餐情况为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TripMeal"+num).focus();
						}});
		return false;
	}
	if($("#TripTrip"+num).val() == "" || $("#TripTrip"+num).val() == null){
		var txt="天数"+$("#TripDay"+num).val()+"的具体行程为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TripTrip"+num).focus();
						}});
		return false;
	}
	
		var bidTrip= {};
		bidTrip['Day']=$("#TripDay"+num).val();
		bidTrip['Address']=$("#TripAddress"+num).val();
		bidTrip['Stay']=$("#TripStay"+num).val();
		bidTrip['Meal']=$("#TripMeal"+num).val();		
		bidTrip['Trip']=$("#TripTrip"+num).val();
		bidTrip['HotelPath1']=$("#TripHotel1"+num).val();
		bidTrip['HotelPath2']=$("#TripHotel2"+num).val();
		bidTrip['HotelPath3']=$("#TripHotel3"+num).val();
		bidTrip['HotelPath4']=$("#TripHotel4"+num).val();
		bidTrip['ScenicPath1']=$("#TripScenic1"+num).val();
		bidTrip['ScenicPath2']=$("#TripScenic2"+num).val();
		bidTrip['ScenicPath3']=$("#TripScenic3"+num).val();
		bidTrip['ScenicPath4']=$("#TripScenic4"+num).val();
		bidTrip['Memo']=$("#TripMemo"+num).val();
		arrs.push(bidTrip);	
	}	
	var arrDetailed=[];
	for( var j=1; j<objDetailedTable.length ; j++ )
	{
		var detailedid=objDetailedTable[j].id;
		alert(detailedid);
		var no = detailedid.substr(detailedid.lastIndexOf("y") + 1);
		alert(no);
		if($("#DetailedName"+no).val() == "" || $("#DetailedName"+no).val() == null){
			var txt="明细名称为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#DetailedName"+no).focus();
						}});
			return false;
		}
		if($("#DetailedBudget"+no).val() == "" || $("#DetailedBudget"+no).val() == null){
		var txt=$("#DetailedName"+no).val()+"的报价为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#DetailedBudget"+no).focus();
						}});
			return false;
		}
		if($("#DetailedContent"+no).val() == "" || $("#DetailedContent"+no).val() == null){
		var txt=$("#DetailedName"+no).val()+"的内容说明为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#DetailedContent"+no).focus();
						}});
			return false;
		}
		var bidDetailed= {};
		bidDetailed['DetailedName']=$("#DetailedName"+no).val();
		bidDetailed['Budget']=$("#DetailedBudget"+no).val();
		bidDetailed['HotelPath1']=$("#DetailedHotel1"+no).val();
		bidDetailed['HotelPath2']=$("#DetailedHotel2"+no).val();
		bidDetailed['HotelPath3']=$("#DetailedHotel3"+no).val();
		bidDetailed['HotelPath4']=$("#DetailedHotel4"+no).val();
		bidDetailed['Content']=$("#DetailedContent"+no).val();
		bidDetailed['Memo']=$("#DetailedMemo"+no).val();
		arrDetailed.push(bidDetailed);	
	}
 	$.ajax({
	        url:"/mmy/savecreatebidtender",
	        type:"post",
	        data:{
		"tender":JSON.stringify(arr),
		"trip":JSON.stringify(arrs),
		"detailed":JSON.stringify(arrDetailed)
},
	        dataType:"text",
	          success:function () {
		
        	 var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
		window.location.href="tofrontbidtenderindex?iInviteID=" + strInviteID+"&strInviteName=" +strInviteName;	
           
						}});
			
	        },
	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
	}	
//前台投标模块 点击修改  修改投标基本信息	2020.12.14
function updateBidTender(){
	var checkNum = $("input[name='radioThis']:checked").length;
	if(checkNum==0){
       var txt=  "请选择一条记录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	} else{
			var state = $("input[name='radioThis']:checked").parents("tr").find("input[type='hidden']").val();
			if(state==0){
			var txt=  "确定要修改吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iTenderID = $("input[name='radioThis']:checked").val();
			var url ="/mmy/toupdatebidtender?iTenderID="+iTenderID;
			window.location = url;
	}});
	}else{
		var txt=  "你已提交不能修改";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
							location.reload();
						}});
	}
	}	
	}
//前台投标模块 点击修改  修改投标行程信息	2020.12.14	hanxl			
function saveUpdateBidTender(){
	var strInviteID=$("#TenderInviteID").val();
	var strInviteName=$("#TenderInviteName").val();
	if($("#TenderBudget").val() == "" || $("#TenderBudget").val() == null){
		var txt="预算金额为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderBudget").focus();
						}});
		return false;
	}
	if($("#TenderOutDate").val() == "" || $("#TenderOutDate").val() == null){
		var txt="出行日期为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderOutDate").focus();
						}});
		return false;
	}
	if($("#TenderBackDate").val() == "" || $("#TenderBackDate").val() == null){
		var txt="返程日期为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderBackDate").focus();
						}});
		return false;
	}
	if($("#TenderOwn").val() == "" || $("#TenderOwn").val() == null){
		var txt="自费项目为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderOwn").focus();
						}});
		return false;
	}
	if($("#TenderTips").val() == "" || $("#TenderTips").val() == null){
		var txt="温馨提示为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderTips").focus();
						}});
		return false;
	}
	if($("#TenderStandard").val() == "" || $("#TenderStandard").val() == null){
		var txt="接待标准为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderStandard").focus();
						}});
		return false;
	}
	if($("#TenderExplain").val() == "" || $("#TenderExplain").val() == null){
		var txt="接待说明为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TenderExplain").focus();
						}});
		return false;
	}
	 	var objTable=$("#tripTable tbody");
if(objTable.length==1){
	var txt="投标行程不能为空，请输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			$("#btn_tripaddtr").click();
						}});
		return false;
}
	var objDetailedTable=$("#detailedTable tbody");
		if(objDetailedTable.length==1){
			var txt="投标明细不能为空，请输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#btn_detailedaddtr").click();
						}});
		return false;
		}
	
	var bidtender= new Object();
	bidtender.iTenderID=$("#TenderID").val();
	bidtender.dOutDate=$("#TenderOutDate").val();
	bidtender.dBackDate=$("#TenderBackDate").val();
	bidtender.fBudget=$("#TenderBudget").val();
	bidtender.cOwn=$("#TenderOwn").val();
	bidtender.cTips=$("#TenderTips").val();
	bidtender.cStandard=$("#TenderStandard").val();
	bidtender.cExplain=$("#TenderExplain").val();
	bidtender.cMemo=$("#TenderMemo").val();
var arr=[];
	arr.push(bidtender);
	var arrTrip=[];
	for( var i=1; i<objTable.length; i++ )
	{
		var id=objTable[i].id;
		var num = id.substr(id.lastIndexOf("y") + 1);
		if($("#TripDay"+num).val() == "" || $("#TripDay"+num).val() == null){
			var txt="行程天数为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#TripDay"+num).focus();
						}});
		return false;
	}
	if($("#TripAddress"+num).val() == "" || $("#TripAddress"+num).val() == null){
			var txt="天数"+$("#TripDay"+num).val()+"的地点为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#TripAddress"+i).focus();
						}});
		return false;
	}

	if($("#TripStay"+num).val() == "" || $("#TripStay"+num).val() == null){
			var txt="天数"+$("#TripDay"+num).val()+"的住宿为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#TripStay"+i).focus();
						}});
		return false;
	}
	if($("#TripMeal"+num).val() == "" || $("#TripMeal"+num).val() == null){
			var txt="天数"+$("#TripDay"+num).val()+"的含餐情况为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#TripMeal"+num).focus();
						}});
		return false;
	}
	if($("#TripTrip"+num).val() == "" || $("#TripTrip"+num).val() == null){
			var txt="天数"+$("#TripDay"+num).val()+"的具体行程为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#TripTrip"+num).focus();
						}});
		return false;
	}
	
		var bidTrip= {};
		bidTrip['Day']=$("#TripDay"+num).val();
		bidTrip['Address']=$("#TripAddress"+num).val();
		bidTrip['Stay']=$("#TripStay"+num).val();
		bidTrip['Meal']=$("#TripMeal"+num).val();		
		bidTrip['Trip']=$("#TripTrip"+num).val();
		bidTrip['HotelPath1']=$("#TripHotel1"+num).val();
		bidTrip['HotelPath2']=$("#TripHotel2"+num).val();
		bidTrip['HotelPath3']=$("#TripHotel3"+num).val();
		bidTrip['HotelPath4']=$("#TripHotel4"+num).val();
		bidTrip['ScenicPath1']=$("#TripScenic1"+num).val();
		bidTrip['ScenicPath2']=$("#TripScenic2"+num).val();
		bidTrip['ScenicPath3']=$("#TripScenic3"+num).val();
		bidTrip['ScenicPath4']=$("#TripScenic4"+num).val();
		bidTrip['Memo']=$("#TripMemo"+num).val();
		arrTrip.push(bidTrip);
	}

		var arrDetailed=[];
	for( var j=1; j<objDetailedTable.length ; j++ )
	{
		var detailedid=objDetailedTable[j].id;
		var no = detailedid.substr(detailedid.lastIndexOf("y") + 1);
		if($("#DetailedName"+no).val() == "" || $("#DetailedName"+no).val() == null){
		var txt="明细名称为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#DetailedName"+no).focus();
						}});
			return false;
		}
		if($("#DetailedBudget"+no).val() == "" || $("#DetailedBudget"+no).val() == null){
			var txt=$("#DetailedName"+no).val()+"的报价为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
	$("#DetailedBudget"+no).focus();
						}});
			return false;
		}
		if($("#DetailedContent"+no).val() == "" || $("#DetailedContent"+no).val() == null){
			var txt=$("#DetailedName"+no).val()+"的内容说明为空，请重新输入";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
$("#DetailedContent"+no).focus();
						}});
			return false;
		}
		var bidDetailed= {};
		bidDetailed['DetailedName']=$("#DetailedName"+no).val();
		bidDetailed['Budget']=$("#DetailedBudget"+no).val();
		bidDetailed['HotelPath1']=$("#DetailedHotel1"+no).val();
		bidDetailed['HotelPath2']=$("#DetailedHotel2"+no).val();
		bidDetailed['HotelPath3']=$("#DetailedHotel3"+no).val();
		bidDetailed['HotelPath4']=$("#DetailedHotel4"+no).val();
		bidDetailed['Content']=$("#DetailedContent"+no).val();
		bidDetailed['Memo']=$("#DetailedMemo"+no).val();
		arrDetailed.push(bidDetailed);	
	}
 	$.ajax({
	        url:"/mmy/saveupdatebidtender",
	        type:"post",
	       data:{"bidTender":JSON.stringify(arr),
"bidTrip":JSON.stringify(arrTrip),
"bidDetailed":JSON.stringify(arrDetailed)
},
	       dataType:"text",
	          success:function () {
		
        	window.location.href="tofrontbidtenderindex?iInviteID=" + strInviteID+"&strInviteName=" +strInviteName;	
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
window.location.href="tofrontbidtenderindex?iInviteID=" + strInviteID+"&strInviteName=" +strInviteName;	
            
						}});
			
	        },
	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
	}	

//提交投标信息 2020.12.14	hanxl
function updateBidTenderState(){
	var checkNum = $("input[name='radioThis']:checked").length;
	if(checkNum==0){
       var txt=  "请选择一条记录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	} else{
			var state = $('input:radio[name="radioThis"]:checked').parents("tr").find("input[type='hidden']").val();
			if(state==0){
				var txt=  "确定要提交吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iTenderID = $("input[name='radioThis']:checked").val();
		 $.ajax({
        url:"/mmy/toupdatebidtenderstate?iTenderID="+iTenderID,
        type:"post",
        data:"",
        dataType:"text",
        success:function (data) {
			 location.reload();
		if(data==1){
			 var txt=  "提交成功！";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			} 	
        },
        error:function () {
           var txt=  "发布失败！";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    });
	}});

			}else {
				    var txt=  "该投标信息已提交，请勿重复提交！";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
			}

	
	}	
}
/*2020.12.21  hanxl 前台招标菜单首页 点击各种要求 弹窗 start*/
 var divInviteMeal=document.getElementsByClassName('inviteMeal');
var divPopMeal=document.getElementsByClassName('popMealContent');
var divPopStay=document.getElementsByClassName('popStayContent');
var divPopCar=document.getElementsByClassName('popCarContent');
var divPopTrip=document.getElementsByClassName('popTripContent');
var divPopShop=document.getElementsByClassName('popShopContent');
var divPopRecreation=document.getElementsByClassName('popRecreationContent');
function inviteMeal(num){
divInviteMeal[num].style.display="block";
divPopMeal[num].style.display="block";
}
function inviteStay(num){
divInviteMeal[num].style.display="block";
divPopStay[num].style.display="block";
}
function inviteCar(num){
divInviteMeal[num].style.display="block";
divPopCar[num].style.display="block";
}
function inviteTrip(num){
divInviteMeal[num].style.display="block";
divPopTrip[num].style.display="block";
}
function inviteShop(num){
divInviteMeal[num].style.display="block";
divPopShop[num].style.display="block";
}
function inviteRecreation(num){
divInviteMeal[num].style.display="block";
divPopRecreation[num].style.display="block";
}
function hidderMeal(num){
divInviteMeal[num].style.display="none";
divPopMeal[num].style.display="none";
divPopStay[num].style.display="none";
divPopCar[num].style.display="none";
divPopTrip[num].style.display="none";
divPopShop[num].style.display="none";
divPopRecreation[num].style.display="none";
}	
/*2020.12.21  hanxl 前台招标菜单首页 点击各种要求 弹窗end*/

//前台景区菜单首页 搜索验证 hanxl   餐馆、酒店用到
function scenicSearchSubmit(scenicSearchForm){
	if(scenicSearchForm.strCityID.value==null ||scenicSearchForm.strCityID.value==""){
		if(!(scenicSearchForm.strProvinceID.value==null ||scenicSearchForm.strProvinceID.value=="")){
			 var txt=  "请选择市";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
				scenicSearchForm.strCityID.focus();
						}});   	
	return false;	
		}
	}
	var scenicPrice1=scenicSearchForm.strScenicPrice1.value;
	var scenicPrice2=scenicSearchForm.strScenicPrice2.value;
	if(parseInt(scenicPrice1)>parseInt(scenicPrice2)){
	scenicSearchForm.strScenicPrice1.value=scenicPrice2;
	scenicSearchForm.strScenicPrice2.value=scenicPrice1;
	}
	return true;
}
//前台景区菜单首页 预留验证 hanxl
function reserveScenic(iScenicID,iUserID){
	if(iUserID==null){
		 var txt=  "你还未登录，请您先登录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    return false;
	}else{
		window.location.href="enterreservescenic?iScenicID=" + iScenicID;	
	}
}

/*景区电子票动态加载订单人表格 2021.01.15 hyanxl */
function selectOrderNum(){	
	var objPlanTable = $("#standNum tr");
	var arrPlan = [];
	for(var i=0;i<objPlanTable.length;i++){
		var linePlan = {};
		linePlan['planID']=$("#planID" + i).val();
		linePlan['number']=$("#planNum" + i).val();
		arrPlan.push(linePlan);
	}
	console.log(arrPlan);
	
	$.ajax({
		url:"/mmy/querypricescenic",
		type:"post",
		data:{
			"plan":JSON.stringify(arrPlan),
			},
		dataType:"text",
		success:function(data){
			$("#showInfo").html("");
			$("#reservePrice").val(data);
			var num=0;
			
			if(!parseInt(data)=='0'){
			var div=$("#showInfo");
			var div1=$("<div id='planInfo' class='reserveTicket'></div>")
			var h3=$("<h3>出行人信息</h3>");
			div1.append(h3);
			var objPlanTable = $("#standNum tr");
				for(var i=0;i<objPlanTable.length;i++){
			var no=$("#planNum" + i).val();
				if(no!=0){
				var div2=$("<div></div>")
				var planName=$("#ticketName"+i).val();
				var h5=$("<h5>"+planName+"</h5>");
				var table=$("<table class='info-table' id='orderInfo"+i+"'></table>");
					for(var j=0;j<no;j++){
					var tr=$("<tr id='tr"+i+j+"'></tr>")
					var th1=$("<th><label for='orderName"+num+"'>姓名</label></th>");
					var td1=$("<td> </td>");
					var input=$("<input type='text' class='scenicorderinput' id='orderName"+num+"' name='OrderName' maxlength='16' required/>");
					td1.append(input);
					var th2=$("<th><label for='orderTel"+num+"'>手机号</label></th>");
					var td2=$("<td></td>");
					var input2=$("<input type='text' class='scenicorderinput' id='orderTel"+num+"' name='OrderTel' maxlength='16' required />");
					td2.append(input2);
					var th3=$("<th><label for='orderIdentity"+num+"'>身份证号</label></th>");
					var td3=$("<td></td>");
					var input3=$("<input type='text' class='scenicorderinput' id='orderIdentity"+num+"' name='Identity' maxlength='18' required/>");
					td3.append(input3);
					tr.append(th1);
					tr.append(td1);
					tr.append(th2);
					tr.append(td2);
					tr.append(th3);
					tr.append(td3);
					table.append(tr);
					num++;
					}
				div2.append(h5);
		div2.append(table);
				}
	div1.append(div2);
			}

			div.append(div1);
			}
		
		}
	})
}

/* 前台景区电子票订单提交 hanxl 2021.01.19 */
function saveReserveScenic(){
   //判断是否选择时间
	if($("#myCalendar").val() == "" || $("#myCalendar").val() == null){
		var txt = "出发时间为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
		$("#myCalendar").focus();
						}});
		return false;
	}
	//如果价格为零 提示需要选择票种
	if($("#reservePrice").val()=="--" ||parseInt($("#reservePrice").val())==0){
	var txt = "请选择电子票数量";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
		$("#planNum"+0).focus();
						}});
		return false;
	}
	
	//获取一共有多少电子票
	var objPlanTable = $("#standNum tr");
	var num=0;
	for(var i=0;i<objPlanTable.length;i++){
		num=num+parseInt($("#planNum" + i).val());
	}
for( var j=0; j<num ; j++ ){
	if($("#orderName"+j).val() == "" || $("#orderName"+j).val() == null){
		var txt = "姓名为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderName"+j).focus();
						}});
		return false;
	}
	if($("#orderTel"+j).val() == "" || $("#orderTel"+j).val() == null){
		var txt = "联系方式为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderTel"+j).focus();
						}});
		return false;
	}else{
		if(!(/^1[3456789]\d{9}$/.test($("#orderTel"+j).val()))){ 
	 var txt=  "订单人手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						$("#orderTel"+j).focus();
						}});
	
		return false;
    }
	}
	if($("#orderIdentity"+j).val() == "" || $("#orderIdentity"+j).val() == null){
		var txt = "身份证号为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderIdentity"+j).focus();
						}});
		return false;
	}else{
		 if(!(/(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$)/.test($("#orderIdentity"+j).val()))){ 
	 var txt=  "订单人身份证号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							$("#orderIdentity"+j).focus();
						}});
						return false;	
    } 
	}
}

	var num=0;
	var arrPlan = [];
	var arrOrder=[];
	//var objPlanTable = $("#standNum tr");
	for(i=0;i<objPlanTable.length;i++){
	
		var scenicPlan = {};
		
		scenicPlan['planID']=$("#planID" + i).val();
		scenicPlan['number']=$("#planNum" + i).val();
		arrPlan.push(scenicPlan);

	var planID=$("#planID" + i).val();
		var number=$("#planNum" + i).val();
		var length=parseInt(number)+num;
		for(;num<length;num++){
			var scenicOrder= {};
		scenicOrder['orderID']=planID;
		scenicOrder['orderName']=$("#orderName" + num).val();
		scenicOrder['orderTel']=$("#orderTel" + num).val();
		scenicOrder['identity']=$("#orderIdentity" + num).val();
		arrOrder.push(scenicOrder);
		}
	}
	var useDate = $("#myCalendar").val();
	
	$.ajax({
		url:"/mmy/savereservescenic",
		type:"post",
		data:{
			"plan":JSON.stringify(arrPlan),
			"order":JSON.stringify(arrOrder),
			"useDate":useDate
			},
		dataType:"json",
		success:function(data){
			var lstID=data.lstID;
			var txt = "预留成功！";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
				var type=$("#strUserType").val();
				if(type=='0'){
					location.href="/mmy/tofrontscenicindex";
				}else{
					location.href="/mmy/topayorderscenic?lstID="+lstID;
				}
			
			}});
		}
	})
}





//前台酒店菜单首页 预留验证 hanxl 2021.0302
function reserveHotel(iHotelID,iUserID){
	if(iUserID==null){
		 var txt=  "你还未登录，请您先登录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    return false;
	}else{
		window.location.href="enterreservehotel?iHotelID=" + iHotelID;	
	}
}
/*酒店房间预定动态加载订单人表格 2021.03.02 hanxl */
function selectRoomOrderNum(){	
	var objPlanTable = $("#standNum tr");
	var arrPlan = [];
	for(var i=0;i<objPlanTable.length;i++){
		var linePlan = {};
		linePlan['planID']=$("#planID" + i).val();
		linePlan['number']=$("#planNum" + i).val();
		arrPlan.push(linePlan);
	}
	console.log(arrPlan);
	
	$.ajax({
		url:"/mmy/querypriceroom",
		type:"post",
		data:{
			"plan":JSON.stringify(arrPlan),
			},
		dataType:"text",
		success:function(data){
			$("#showInfo").html("");
			$("#reservePrice").val(data);
			var num=0;
			
			if(!parseInt(data)=='0'){
			var div=$("#showInfo");
			var div1=$("<div id='planInfo' class='reserveTicket'></div>")
			var h3=$("<h3>预留人信息</h3>");
			div1.append(h3);
			var objPlanTable = $("#standNum tr");
				for(var i=0;i<objPlanTable.length;i++){
			var no=$("#planNum" + i).val();
				if(no!=0){
				var div2=$("<div></div>")
				var planName=$("#service"+i).val();
				var h5=$("<h5>"+planName+"</h5>");
				var table=$("<table class='info-table' id='orderInfo"+i+"'></table>");
					for(var j=0;j<no;j++){
					var tr=$("<tr id='tr"+i+j+"'></tr>")
					var th1=$("<th><label for='orderName"+num+"'>姓名</label></th>");
					var td1=$("<td> </td>");
					var input=$("<input type='text' class='scenicorderinput' id='orderName"+num+"' name='OrderName' maxlength='16' required/>");
					td1.append(input);
					var th2=$("<th><label for='orderTel"+num+"'>手机号</label></th>");
					var td2=$("<td></td>");
					var input2=$("<input type='text' class='scenicorderinput' id='orderTel"+num+"' name='OrderTel' maxlength='16' required />");
					td2.append(input2);
					var th3=$("<th><label for='orderIdentity"+num+"'>身份证号</label></th>");
					var td3=$("<td></td>");
					var input3=$("<input type='text' class='scenicorderinput' id='orderIdentity"+num+"' name='Identity' maxlength='18' required/>");
					td3.append(input3);
					tr.append(th1);
					tr.append(td1);
					tr.append(th2);
					tr.append(td2);
					tr.append(th3);
					tr.append(td3);
					table.append(tr);
					num++;
					}
				div2.append(h5);
		div2.append(table);
				}
	div1.append(div2);
			}

			div.append(div1);
			}
		
		}
	})
}
/* 前台景区电子票订单提交 hanxl 2021.03.02 */
function saveReserveHotel(){
   //判断是否选择时间
	if($("#myCalendar").val() == "" || $("#myCalendar").val() == null){
		var txt = "出发时间为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
		$("#myCalendar").focus();
						}});
		return false;
	}
	//如果价格为零 提示需要选择票种
	if($("#reservePrice").val()=="--" ||parseInt($("#reservePrice").val())==0){
	var txt = "请选择房间数量";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning,{onOk:function(){
		$("#planNum"+0).focus();
						}});
		return false;
	}
	
	//获取一共有多少电子票
	var objPlanTable = $("#standNum tr");
	var num=0;
	for(var i=0;i<objPlanTable.length;i++){
		num=num+parseInt($("#planNum" + i).val());
	}
for( var j=0; j<num ; j++ ){
	if($("#orderName"+j).val() == "" || $("#orderName"+j).val() == null){
		var txt = "姓名为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderName"+j).focus();
						}});
		return false;
	}
	if($("#orderTel"+j).val() == "" || $("#orderTel"+j).val() == null){
		var txt = "联系方式为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderTel"+j).focus();
						}});
		return false;
	}else{
		if(!(/^1[3456789]\d{9}$/.test($("#orderTel"+j).val()))){ 
	 var txt=  "订单人手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						$("#orderTel"+j).focus();
						}});
	
		return false;
    }
	}
	if($("#orderIdentity"+j).val() == "" || $("#orderIdentity"+j).val() == null){
		var txt = "身份证号为空，请输入";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
		$("#orderIdentity"+j).focus();
						}});
		return false;
	}else{
		 if(!(/(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$)/.test($("#orderIdentity"+j).val()))){ 
	 var txt=  "订单人身份证号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
							$("#orderIdentity"+j).focus();
						}});
						return false;	
    } 
	}
}

	var num=0;
	var arrPlan = [];
	var arrOrder=[];
	//var objPlanTable = $("#standNum tr");
	for(i=0;i<objPlanTable.length;i++){
	
		var hotelPlan = {};
		
		hotelPlan['planID']=$("#planID" + i).val();
		hotelPlan['number']=$("#planNum" + i).val();
		arrPlan.push(hotelPlan);

	var planID=$("#planID" + i).val();
		var number=$("#planNum" + i).val();
		var length=parseInt(number)+num;
		for(;num<length;num++){
			var hotelOrder= {};
		hotelOrder['orderID']=planID;
		hotelOrder['orderName']=$("#orderName" + num).val();
		hotelOrder['orderTel']=$("#orderTel" + num).val();
		hotelOrder['identity']=$("#orderIdentity" + num).val();
		arrOrder.push(hotelOrder);
		}
	}
	var useDate = $("#myCalendar").val();
	
	$.ajax({
		url:"/mmy/savereservehotel",
		type:"post",
		data:{
			"plan":JSON.stringify(arrPlan),
			"order":JSON.stringify(arrOrder),
			"useDate":useDate
			},
		dataType:"json",
		success:function(data){
			var lstID=data.lstID;
			var txt = "预留成功！";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
				var type=$("#strUserType").val();
				if(type=='0'){
					location.href="/mmy/tofronthotelindex";
				}else{
					location.href="/mmy/topayorderhotel?lstID="+lstID;
				}
			
			}});
		}
	})
}
	/*2020.09.26  hanxl*/



		/* 个人中心修改投标基本信息 */
		function updateMyTender(){
			 var checkNum = $("input[name='ckone']:checked").length;
			
			    if(checkNum==0){
	                   var txt=  "至少选择一项";
	 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
			    } else if(checkNum>1){
				var txt=  "最多选择一项";
	 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
					}else{
						var iTenderID =  $("input[name='ckone']:checked").val();
						 
						 location.href="/mmy/toupdatemytender?iTenderID="+iTenderID;
					}
			
					}
	/* 前台修改投标提交 */
	function saveUpdateMyTender(){
			var bidtender= new Object();
		/*投标信息表里的招标编码*/
		bidtender.iTenderID=$("#TenderID").val()
		bidtender.iInviteID=$("#TenderInviteID").val();
		bidtender.iOrgID=$("#TenderOrgID").val();
		bidtender.dOutDate=$("#TenderOutDate").val();
		bidtender.dBackDate=$("#TenderBackDate").val();
		bidtender.fBudget=$("#TenderBudget").val();
		bidtender.cOwn=$("#TenderOwn").val();
		bidtender.cTips=$("#TenderTips").val();
		bidtender.cStandard=$("#TenderStandard").val();
		bidtender.cExplain=$("#TenderExplain").val();
		bidtender.cMemo=$("#TenderMemo").val();
		var arr=[];
		arr.push(bidtender);
			var objTable=$("#tripTable tbody");
		var arrs=[];
		for( var i=0; i<objTable.length-1 ; i++ )
		{
			var bidTrip= {};
			
			bidTrip['Day']=$("#TripDay"+i).val();
			bidTrip['Address']=$("#TripAddress"+i).val();
			bidTrip['Stay']=$("#TripStay"+i).val();
			bidTrip['Meal']=$("#TripMeal"+i).val();		
			bidTrip['Trip']=$("#TripTrip"+i).val();
			bidTrip['HotelPath1']=$("#TripHotel1"+i).val();
			bidTrip['HotelPath2']=$("#TripHotel2"+i).val();
			bidTrip['HotelPath3']=$("#TripHotel3"+i).val();
			bidTrip['HotelPath4']=$("#TripHotel4"+i).val();
			bidTrip['ScenicPath1']=$("#TripScenic1"+i).val();
			bidTrip['ScenicPath2']=$("#TripScenic2"+i).val();
			bidTrip['ScenicPath3']=$("#TripScenic3"+i).val();
			bidTrip['ScenicPath4']=$("#TripScenic4"+i).val();
			bidTrip['Memo']=$("#TripMemo"+i).val();
			arrs.push(bidTrip);	
		}
	 		var objDetailedTable=$("#detailedTable tbody");
		var arrDetailed=[];
		for( var i=0; i<objDetailedTable.length-1 ; i++ )
		{
			var bidDetailed= {};
			
			bidDetailed['DetailedName']=$("#DetailedName"+i).val();
			bidDetailed['Budget']=$("#DetailedBudget"+i).val();
			
			
			bidDetailed['HotelPath1']=$("#DetailedHotel1"+i).val();
			bidDetailed['HotelPath2']=$("#DetailedHotel2"+i).val();
			bidDetailed['HotelPath3']=$("#DetailedHotel3"+i).val();
			bidDetailed['HotelPath4']=$("#DetailedHotel4"+i).val();
			bidDetailed['Content']=$("#DetailedContent"+i).val();
			bidDetailed['Memo']=$("#DetailedMemo"+i).val();
			arrDetailed.push(bidDetailed);	
		}
		
		
	 	$.ajax({
		        url:"/mmy/saveupdatemytender",
		        type:"post",
		        data:{"tender":JSON.stringify(arr),"trip":JSON.stringify(arrs),"detailed":JSON.stringify(arrDetailed)},
		        dataType:"text",
	
		          success:function () {
	        		   
	            var txt=  "修改成功";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
				
		        },
	
		        error:function () {
		        	 var txt=  "修改失败";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
		        }
		})
	}
	
	
	
	/* 个人中心删除投标基本信息 */
	function delMyTenderBatch(){
			  var checkNum = $("input[name='ckone']:checked").length;
	
	    if(checkNum==0){
	       var txt=  "至少选择一项";
	 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	    }else{
					
	    if(confirm("确定要删除吗？")){
	        var checklist = new Array();
	        $("input[name='ckone']:checked").each(function () {
	            checklist.push($(this).val());
			
	        });
	    }
	    
	    $.ajax({
	        url:"/mmy/deletemytenderchecked",
	        type:"post",
	        data:{
	            checkList:checklist.toString()
	
	        },
	        dataType:"text",
	        success:function () {
				 location.reload();
	            var txt=  "删除成功";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
				
	        },
	        error:function () {
	           var txt=  "删除失败";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	    })
	}
	}
	
	
	
	
	/* 个人中心修改招标基本信息 */
		function updateMyInvite(){
			 var checkNum = $("input[name='ckone']:checked").length;
			
			    if(checkNum==0){
			      
	 				
	                   var txt=  "至少选择一项";
	 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	               
	 
	
			    } else if(checkNum>1){
				var txt=  "最多选择一项";
	 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
					}else{
						var iInviteID =  $("input[name='ckone']:checked").val();
						 
						 location.href="/mmy/toupdatemyinvite?iInviteID="+iInviteID;
					}
			
					}
	
	